define([ 'jquery', 'game/canvas', 'game/objects/hex', 'text!html/welcome.html', 'css!cssdir/welcome' ], function($, canvas, hex, welcomeHtml, welcomeCss) {
    $(document).ready(function() {
        // load welcome page
        $('#main').append($(welcomeHtml));
        
        // init canvas TODO move to another place
        canvas.init();
        canvas.resize();
        window.addEventListener('resize', function(event) {
            canvas.resize();
        }, false);
        canvas.plane.hex(0, 0);
        canvas.plane.hex(1, 0, 'powerplant');
        canvas.plane.hex(1, 1, 'powerplant');
        canvas.plane.hex(1, -1, 'powerplant');
        canvas.plane.hex(2, 0, 'unitfactory');
        canvas.plane.hex(3, 0);
        canvas.redraw();
    });
});
